package cn.tsmchina.one.service.user;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.tsmchina.one.dao.user.UserManageDao;
import cn.tsmchina.one.domain.user.User;

/**
 * Description:
 * @author ying 
 * @date 2013-10-4
 * @version 1.0
 * Copyright: Copyright (c) 2013 TSM,Inc
 */
@Service
public class UserManageServiceImpl implements UserManageService{
	@Autowired
	private UserManageDao userManageDao;
	
	@Override
	public List<User> getUsers(int page, long customerId) {
		return userManageDao.getUsers(page, customerId);
	}

	@Override
	public int getTotal(long customerId) {
		return userManageDao.getTotal(customerId);
	}

	@Override
	public User editUserInfo(Long userId) {
		return userManageDao.getUserById(userId);
	}

	@Override
	public void updateUser(User user) {
		userManageDao.updateUser(user);
	}

	@Override
	public User getUser(long id) {
		return userManageDao.getUserById(id);
	}

}

